UNIT SpeechIntf;


INTERFACE


USES
        {$U-}
        {$U obj/MemTypes  }  MemTypes,
        {$U obj/QuickDraw }  QuickDraw,
        {$U obj/OsIntf	  }  OsIntf,
        {$U obj/toolIntf  }  ToolIntf;


CONST
        noExcpsFile  = '';	        {signals Reader to use only basic rules}
        noReader = 'noReader';	        {signals SpeechOn to NOT bring in Reader}
        fullUnitT = -4000;	        {error code for driver unit table full}


TYPE
        SpeechErr = Integer;
        SpeechRecord  = array [0..99] of byte;  {Driver parm block, used internally}
        SpeechPointer = ^SpeechRecord;	        {pointer to driver parm block}
        SpeechHandle  = ^SpeechPointer;	        {handle to driver parm block}

        Sex	 = (Male, Female);
        F0Mode	 = (Natural, Robotic, NoChange);
        Language = (xEnglish, French, Spanish, German, Italian);

        VoiceRecord = RECORD
                        theSex:	      Sex;
                        theLanguage:  Language;
                        theRate:      INTEGER;
                        thePitch:     INTEGER;
                        theMode:      F0Mode;
                        theName:      Str255;
                        refCon:	      LongInt;
                      END;
        VoicePtr = ^VoiceRecord;


FUNCTION  SpeechOn      (ExcpsFile: Str255;
                         VAR theSpeech: SpeechHandle): SpeechErr;

PROCEDURE SpeechOff     (theSpeech: SpeechHandle);

PROCEDURE SpeechRate    (theSpeech: SpeechHandle;
                         theRate: Integer);

PROCEDURE SpeechPitch   (theSpeech: SpeechHandle;
                         thePitch: Integer;
                         theMode: F0Mode);

PROCEDURE SpeechSex     (theSpeech: SpeechHandle;
                         theSex: Sex);	      {reserved for future implementation}

FUNCTION Reader	        (theSpeech: SpeechHandle;
                         EnglishInput: Ptr;
                         InputLength: LongInt;
                         PhoneticOutput: Handle): SpeechErr;

FUNCTION MacinTalk      (theSpeech: SpeechHandle;
                         Phonemes: Handle): SpeechErr;



IMPLEMENTATION


FUNCTION SpeechOn;      EXTERNAL;
FUNCTION Reader;        EXTERNAL;
FUNCTION MacinTalk;     EXTERNAL;

PROCEDURE SpeechOff;    EXTERNAL;
PROCEDURE SpeechRate;   EXTERNAL;
PROCEDURE SpeechPitch;  EXTERNAL;
PROCEDURE SpeechSex;    EXTERNAL;	    {reserved for future implementation}


END. { of unit }
